﻿@model P2PWeb.Models.Account
@{
    ViewBag.Title = "Index";
}
@using P2PWeb.Controllers;
@using P2PWeb.Common;
@using P2PWeb;

<link href="@Url.Content("~/Content/account.css?ver=0.2")" rel="stylesheet" type="text/css" />

<div class="main_loan">
    <div class="main_loan_top"></div>
    <div class="main_loan_content clearfjx">
        @{Html.RenderPartial("LeftMenus");}
        <div class="loan_content">
            <div class="inner">
                <div class="breadcrumbs rel">
                    <p>
                        <strong class="gtlt">&gt;&gt;</strong><span class="lay">账户首页</span>
                        <strong class="gtlt">&gt;&gt;</strong><span class="lay cur">我的账号</span>
                    </p>
                </div>
            </div>
            <div class="loan_box mt30">
                <div class="invest_table mt30">
                    <table class="AccountInfoTable">
                        <tr>
                            <th class="left_td">填写基本信息</th>
                            <th>操作</th>
                        </tr>
                        <tr>
                            <td class="left_td">
                                @if (Model.AccountInfo == null || Model.Campaign == null || Model.ContactInfo == null)
                                {
                                    @Html.Label("还没有填写基本资料");
                                }
                                else
                                {
                                    @Html.Label("已填写了基本资料");
                                }
                            </td>
                            <td>
                                @if (Model.Status != (int)AccountState.LookThrough)
                                {
                                    if (Model.AccountInfo == null || Model.Campaign == null || Model.ContactInfo == null)
                                    {
                                    @Html.ActionLink("填写基本资料", "AccountInfo");
                                    }
                                    else
                                    {
                                    @Html.ActionLink("修改基本资料", "AccountInfo");
                                    }
                                }
                                else
                                {
                                    @Html.Raw("账户正在审核中...");
                                }
                            </td>
                        </tr>
                        <tr>
                            <th class="left_td">相关证明附件上传</th>
                            <th>操作</th>
                        </tr>
                        <tr>
                            <td class="left_td">
                                @if (Model.AccountAuthentication == null)
                                {
                                    @Html.Label("还没有上传附件");
                                }
                                else
                                {
                                    @Html.LabelFor(m => m.AccountAuthentication.Status,
                                        ((P2PWeb.Common.AccountAuthenticationState)Model.AccountAuthentication.Status).GetDisplayName());
                                }
                            </td>
                            <td>
                                @if (Model.AccountInfo == null || Model.WorkInfo == null || Model.ContactInfo == null)
                                {
                                    @Html.Raw("请先填写基本资料,然后才能上传附件");
                                }
                                else
                                {
                                    if (Model.Status != (int)AccountState.LookThrough)
                                    {
                                        if (Model.AccountAuthentication == null ||
                                        Model.AccountAuthentication.Status == (int)P2PWeb.Common.AccountAuthenticationState.unfinished)
                                        {
                                    @Html.ActionLink("附件上传", "AccountUploadify");
                                        }
                                        else
                                        {
                                    @Html.ActionLink("重新上传附件", "AccountUploadify");
                                        }
                                    }
                                    else
                                    {
                                        @Html.Raw("账户正在审核中...");
                                    }
                                }
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="main_loan_bottom"></div>
</div>
